package com.example.demo.Strategy02;

public class testStrategy {
    public static void main(String[] args) {
        Double money = 600d;
        String type1 = "正常收费";
        CashContext cs1 = new CashContext(type1);
        double result1 = cs1.getResult(money);
        System.out.println(result1);
        String type2 = "满300返100";
        CashContext cs2 = new CashContext(type2);
        double result2 = cs2.getResult(money);
        System.out.println(result2);
        String type3 = "8折";
        CashContext cs3 = new CashContext(type3);
        double result3 = cs3.getResult(money);
        System.out.println(result3);
    }
}
